<!doctype html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <title>厂商验证接口demo</title>
    <style type="text/css">
        a {
            color: blue;
        }
    </style>
    <script type="text/javascript" src="/project/commstyle/js/jquery.js"></script>
    <script type="text/javascript">
        function chkForm() {
            $('#_form').attr('action', $('#_url').val());
            $('#_form').attr('target', '_iframe');
            $('#_form').submit();
        }
    </script>
</head>
<body bgcolor="#CCE8CF">
<h3>厂商验证接口demo</h3>
<table width="100%">
    <tbody>
    <tr>
        <td width="30%" valign="top">
            <form target="_iframe" method="get" action="" id="_form">
                <table>
                    <tr>
                        <td>接口说明</td>
                        <td>
                            mac地址是爱助手和厂商双方共同认可的推广标识。<br />
                            爱助手通过调用厂商接口认领自己的推广记录
                        </td>
                    </tr>
                    <tr>
                        <td>接口(厂商提供)</td>
                        <td>
                            <input type="text" value="http://api.dxslaw.com/api_demo.php" name="url" id="_url" size="40">
                        </td>
                    </tr>
                    <tr>
                        <td>app_id</td>
                        <td><input type="text" value="550111418" name="app_id"></td>
                    </tr>
                    <tr>
                        <td>mac_id</td>
                        <td><input type="text" value="BC:52:B7:4A:FC:24" name="mac_id"></td>
                    </tr>
                    <tr>
                        <td>channel_id</td>
                        <td><input type="text" value="izhushou" name="channel_id"></td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <button onclick="chkForm()" href="javascript:;">===提交===</button>
                            <a href="?act=api_demo&clear=1">重新测试</a>
                        </td>
                    </tr>
                </table>
            </form>
        </td>
        <td width="50%">
            <iframe name="_iframe" id="_iframe" width="100%" height="80" frameborder="0" src="" border="0"
                    style="border: 1px dashed gray;"
                    marginheight="0"
                    marginwidth="0" allowtransparency="true"></iframe>
            <table border="1" width="100%">
                <tr>
                    <td colspan="6">厂商记录APP第一次启动时的时间和mac地址</td>
                </tr>
                <tr>
                    <td>add_time</td>
                    <td>app_id</td>
                    <td>mac_id</td>
                    <td>status</td>
                    <td>fail_reason</td>
                    <td>channel_id</td>
                </tr>
                <?php foreach($demo_list as $v) { ?>
                <tr>
                    <td><?php echo $v['add_time']; ?></td>
                    <td><?php echo $v['app_id']; ?></td>
                    <td><?php echo $v['mac_id']; ?></td>
                    <td><?php echo $v['status']; ?></td>
                    <td><?php echo $v['fail_reason']; ?></td>
                    <td><?php echo $v['channel_id']; ?></td>
                </tr>
                <?php } ?>
                <tr>
                    <td colspan="6">
                        status：0未核对，1有效，10000无效<br />
                        fail_reason：验收失败原因<br />
                        channel_id：渠道标识<br />
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    </tbody>
</table>
</body>
</html>
